﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Meqs.Entity
{
    [Serializable]
    public class ExamTeachSchool
    {
        private int _rID;
        private int _examID;
        private int _causeID;
        private int _teacherID;
        private int _classID;
        private string _schoolmark;
        public ExamTeachSchool()
        {
        }

        public ExamTeachSchool(int rID, int examID, int causeID, int teacherID, int classID, string schoolmark)
        {
            _rID = rID;
            _examID = examID;
            _causeID = causeID;
            _teacherID = teacherID;
            _classID = classID;
            _schoolmark = schoolmark;
        }

        public int RID
        {
            get { return _rID; }
            set { _rID = value; }
        }

        public int ExamID
        {
            get { return _examID; }
            set { _examID = value; }
        }

        public int CauseID
        {
            get { return _causeID; }
            set { _causeID = value; }
        }

        public int TeacherID
        {
            get { return _teacherID; }
            set { _teacherID = value; }
        }

        public int ClassID
        {
            get { return _classID; }
            set { _classID = value; }
        }

        public string SchoolMark
        {
            get { return _schoolmark; }
            set { _schoolmark = value; }
        }

        public bool Equals(ExamTeachSchool other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return other._rID == _rID;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof (ExamTeachSchool)) return false;
            return Equals((ExamTeachSchool) obj);
        }

        public override int GetHashCode()
        {
            return _rID;
        }
    }
}
